package com.weijin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.weijin.model.entities.Record;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author WeiJin
 * @Version 1.0
 * @Date 2025/3/28 15:51
 */
@Mapper
public interface RecordMapper extends BaseMapper<Record> {

    /**
     * 根据id获取某天的签到记录
     *
     * @param userId   用户id
     * @param dateTime 时间
     * @return 签到记录
     */
    List<Record> selectTodayRecord(@Param("userId") String userId, @Param("dateTime") LocalDateTime dateTime);
}
